{% extends "../base_adminlte.html" %}

{% block content %}
<div class="content-wrapper">
  <!-- Content Header (Page header) -->
    <div class="content-header">
    </div>
  <section class="content">
        <form  action="{% url 'usermod' %}?id={{ user.id }}" method="post">
            <table style="border-collapse:separate; border-spacing: 0px 10px;
            margin-left: 400px;margin-top: 60px;align-content: center;">
                <tr style="height: 10px">
                    <td>用户名称</td>
                    <td><input type="text" name="username" value="{{ user.username }}"  >
                       <label>{{ error.username.0 }}</label>
                  </td>
                </tr>
                <tr>
                    <td>状态</td>
                    <td>
                        <select id='status' name="status" class="form-control"  >
                              <option value="{{ status }}" >{{ status }}</option>
                                 {% for g in status_all %}
                                      <option value={{ g }}>
                                          {{  g }}
                                      </option>
                                  {% endfor %}
                         </select>
                    </td>
                     <td>
                       <label>{{ error.status.0 }}</label>
                  </td>
                </tr>
                <tr>
                    <td>所属组</td>
                    <td>
                    <select id='group' name="group" class="form-control"  >
                              <option value="{{ group.name }}" >{{ group.name }}</option>
                                 {% for g in group_all %}
                                      <option value={{ g.name }}>
                                          {{  g.name }}
                                      </option>
                                  {% endfor %}
                         </select>
                    </td>
                     <td>
                       <label>{{ error.group.0 }}</label>
                  </td>
                </tr>
                <tr>
                    <td></td>
                    <td><input type="submit" value="提交" >
                        <button style="margin-left: 10%" onclick="location.href='/ansible/userlist/1'" type="button" value="取消" >取消</button></td>
                </tr>
            </table>
    </form>
  </section>
</div>

{% endblock %}
